import request from '@/utils/request'

// 查询故障列列表
export function listFailure(query) {
  return request({
    url: '/failure/failure/list',
    method: 'get',
    params: query
  })
}

// 查询故障列详细
export function getFailure(id) {
  return request({
    url: '/failure/failure/' + id,
    method: 'get'
  })
}

// 新增故障列
export function addFailure(data) {
  return request({
    url: '/failure/failure',
    method: 'post',
    data: data
  })
}

// 修改故障列
export function updateFailure(data) {
  return request({
    url: '/failure/failure',
    method: 'put',
    data: data
  })
}

// 删除故障列
export function delFailure(id) {
  return request({
    url: '/failure/failure/' + id,
    method: 'delete'
  })
}

// redis查询列表
export function redisFailure(query) {
  return request({
    url: '/failure/failure/listfailure',
    method: 'get',
    params: query
  })
}
